<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
    <meta name="HandheldFriendly" content="true">
    <!-- 微软的老式浏览器 -->
    <meta name="MobileOptimized" content="320">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!-- UC应用模式 -->
    <meta name="browsermode" content="application">
    <!-- QQ应用模式 -->
    <meta name="x5-page-mode" content="app">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>整理一下</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>

<body class="flex justify-center items-center h-screen overflow-hidden bg-white font-sans text-center px-6">
<div class="w-full">
    <span class="text-xs rounded-full mb-2 inline-block px-2 py-1 border border-amber-500/15 bg-amber-500/15 text-amber-500">🔥 New version dropped!</span>
    <h1 class="text-4xl lg:text-6xl font-bold font-sans">
        <span class="text-2xl lg:text-4xl text-gray-400 block font-medium">专注解决文件管理问题！</span>
        <br>
        指定一个工作空间吧(❁´◡`❁)
    </h1>

    <!-- 更换为蓝色的按钮 -->
    <button id="submit" class="mt-8 px-6 py-3 bg-gradient-to-r from-blue-500 to-indigo-500 text-white rounded-full font-medium shadow-lg hover:shadow-xl transform hover:-translate-y-1 transition-all duration-300 flex items-center justify-center mx-auto">
        <i class="fa fa-folder-open mr-2"></i>选择工作空间
    </button>
</div>

<script>

    document.addEventListener('DOMContentLoaded', () => {
        document.getElementById('submit').addEventListener('click', () => {
            window.api.specify_workspace().then((response) => {
                if (response && response.success) {
                    console.log('Selected directory:', response.path);
                    // 跳转到主页
                    window.location.href = `./static/html/index.html?path=${response.path}`;
                } else {
                    console.log('No directory selected or an error occurred');
                }
            });//点击并且选中工作空间
        });
    });

</script>
</body>


<!--<body>-->
<!--<h1>来自 Electron 渲染器的问好！</h1>-->
<!--<p>👋</p>-->
<!--<p id="info"></p>-->
<!--</body>-->
<!--<script src="./renderer.js"></script>-->
</html>

